package com;

import com.domain.Award;
import com.domain.Result;
import com.domain.Expression;
import com.engine.RuleEngine;
import com.util.RandomUtil;

public class Application {
    public static void main(String[] args) {
        //获得投完骰子的结果，给到result类
        Result result = RandomUtil.getResult();

        //将result类中各点数的结果赋值给expression类，用来给引擎作为条件判断
        Expression ex = new Expression(result);
        //获取引擎对象
        RuleEngine engine = new RuleEngine();

        //调用引擎方法对结果进行判断，并返回结果
        Award award = engine.process(ex);
        //输出结果
        System.out.println(award);
    }
}
